package cn.zn.flow.mapper;

import cn.zn.flow.entity.FlowNode;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
 * <p>
 * 审批流程节点 Mapper 接口
 * </p>
 *
 * @author zn-admin
 * @since 2021-06-28
 */
public interface FlowNodeMapper extends BaseMapper<FlowNode> {

    /**
     * 获取所有审批节点
     *
     * @param flowId 流程id
     * @return 结果
     */
    List<FlowNode> selectFlowNodeListByFlowId(String flowId);

    /**
     * 获取所有审批节点
     *
     * @param flowIds 流程id
     * @return 结果
     */
    List<FlowNode> selectFlowNodeListByFlowIds(List<String> flowIds);

    /**
     * 获取当前步骤没审批节点数
     *
     * @param flowId 流程id
     * @param orders 步骤
     * @return 结果
     */
    Integer countNoApproveFlowNode(String flowId, Integer orders);

    /**
     * 获取下一步审批节点
     *
     * @param flowId 流程id
     * @param orders 步骤
     * @return 结果
     */
    List<FlowNode> selectNextFlowNodeList(String flowId, Integer orders);

}
